from openai import OpenAI
from dotenv import load_dotenv
import os

load_dotenv()

client = OpenAI(
    base_url="https://ai.gitee.com/v1",
    api_key=os.getenv("api_key"),
)

response = client.moderations.create(
	input=[
		{
			"type": "text",
			"text": "...text to classify goes here..." # 需替换为实际要审核的文本
		}
	],
	model="Security-semantic-filtering",
)
print("Risk Control Detection Results:")
print(response)